import { Module } from '@nestjs/common'
import { DefaultAdminModule, DefaultAdminSite } from 'nestjs-admin'
import { CommentAdmin } from './comment.admin'
import { ItemAdmin } from './item.admin'
import { UserAdmin } from './user.admin'

@Module({
  imports: [DefaultAdminModule]
})
export class AdminModule {
  constructor(private readonly adminSite: DefaultAdminSite) {
    adminSite.siteHeader = '校园二手交易平台管理后台'
    adminSite.register('用户管理', UserAdmin)
    adminSite.register('商品管理', ItemAdmin)
    adminSite.register('评论管理', CommentAdmin)
  }
}
